import {setServer} from "@/utils/axios";
import {fireUrl} from "../../../url";
const request = setServer(fireUrl);

// 查询消防设备
export function getFire(query) {
  return request({
    url: '/mainframe/',
    method: 'get',
    params: query
  })
}

// 查询小区消防
export function getFireByBiotopeId(query) {
  return request({
    url: '/mainframe/listByBiotopeId',
    method: 'get',
    params: query
  })
}

// 绑定消防
export function bindFireDevice(query) {
  return request({
    url: '/mainframe/bindDevice',
    method: 'put',
    data: query
  })
}

// 同步消防设备
export function synFireMainframe() {
  return request({
    url: '/mainframe/synData',
    method: 'get',
  })
}

// 获取消防设备已绑定的监控设备id
export function getBindMonitorIds(query) {
  return request({
    url: '/mainframe/listByRecordCode',
    method: 'get',
    params: query
  })
}

// 消防设备绑定监控
export function mainframeBindMonitorDevice(query) {
  return request({
    url: '/mainframe/bindMonitorDevice',
    method: 'put',
    params: query
  })
}
